package com.weixing.mall.core.config;

import com.weixing.mall.core.interceptor.AgentInterceptor;
import com.weixing.mall.core.interceptor.AuthInterceptor;
import com.weixing.mall.core.properties.WeiXingProperties;
import com.weixing.mall.core.support.auth.AuthInfoArgsResolver;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;

/**
 * @Author: kfc
 * @Description: <br/>
 * Date:Create in 2019/7/24 15:09
 * @Modified By:
 */
@Configuration
@EnableConfigurationProperties(value = WeiXingProperties.class)
public class WeiXingCoreConfig {


    @Bean
    public AuthInterceptor authInterceptor() {
        return new AuthInterceptor();
    }

    @Bean
    public AgentInterceptor agentInterceptor() {
        return new AgentInterceptor();
    }

    @Bean
    public AuthInfoArgsResolver authInfoArgsResolver(){
        return new AuthInfoArgsResolver();
    }


}
